import React,{Component} from 'react';
//引入轮播图插件
import ReactSwipe from 'react-swipe';
import './swiper.css';
class Swiper extends Component{
//	constructor(props){
//		super(props)
//	}
	
	render(){
		return (
			<div>
			<ReactSwipe className="carousel" swipeOptions={{continuous:true,auto:3000}} key={this.props.swiperList.length}>
				
				{
					this.props.swiperList.map((item)=>
					<div key={item.id} style={{'width':'100%'}}>
						<img src ={item.imageUrl} alt={item.name}/>
					</div>
					)
				}
				</ReactSwipe>
			</div>
		)
		
	}
}


//输出
export default Swiper;